<div id="main">
    <table cellspacing="0" class="list">
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>顺序</th>
            <th>操作</th>
        </tr>
        <?php foreach ($records as $record): ?>
        <tr class="hover">
            <td><?php echo $record['id'] ?></td>
            <td>
                <?php echo HTML::anchor("admin/chapter/edit/{$record['id']}", $record['name']) ?>
            </td>
            <td><?php echo $record['order'] ?></td>
            <td class="action">
                <?php echo HTML::anchor("admin/lesson/index/{$record['id']}", '课时列表') ?>
                <?php echo HTML::anchor("admin/chapter/edit/{$record['id']}", '修改') ?>
                <?php echo HTML::anchor("admin/chapter/delete/{$record['id']}", '删除', array('onclick' => "return window.confirm('确认要删除此章节吗？\\n与其相关的课时也将会被删除！\\n\\n本操作不可恢复！');")) ?>
            </td>
        </tr>
        <?php endforeach ?>
    </table>
    <?php echo $pagination ?>
</div>